package com.eattravel.mapper;

import com.eattravel.pojo.Comment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentMapper {
    /**
     * 加载对应的商品下的评论内容
     * @param foodId
     * @return
     */
    List<Comment> findCommentByFoodId(String foodId);

    /**
     * 添加主评论
     * @param comment
     * @return
     */
    int insertComment(@Param("comment") Comment comment);
}